package com.sky.task;

import com.sky.mapper.OrderMapper;
import lombok.extern.slf4j.Slf4j;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.scheduling.annotation.Scheduled;
import org.springframework.stereotype.Component;

@Component
@Slf4j
public class OrderTask {

    @Autowired
    private OrderMapper orderMapper;

    //定时处理超时订单
    @Scheduled(cron = "0 * * * * ? ")
    public void timeoutOrder() {
        log.info("定时处理超时订单");
        //根据订单状态与时间查询订单
        //如果查询到订单则将订单取消
    }
}
